#include "model/skyBox.h"
#include "mesh.h"

SkyBox::SkyBox(const std::string& texture, float size) {
	_shader.textureID = loadTexture(texture);//读取纹理
	//定义cube的顶点
	createCubeMesh(_mesh, size);
	_mesh.update_buffer();
}

void SkyBox::render(glm::mat4 viewMat, glm::mat4 projMat) {
	auto modelMat = getTransMat();
	_shader.render(_mesh,viewMat, projMat);
}